[WC-3464] Rich text Tiptapeditor#2270
Conversation
584fe21 to
96df6fb
Compare
This comment has been minimized.
This comment has been minimized.
96df6fb to
57a6695
Compare
This comment has been minimized.
This comment has been minimized.
57a6695 to
3ca1f8c
Compare
This comment has been minimized.
This comment has been minimized.
32f038c to
e544a1d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
c4bbd17 to
6397d1b
Compare
This comment has been minimized.
This comment has been minimized.
|
Would have a look at the high and medium flagged CC review comments |
f7d16ca to
2755b5d
Compare
5925c7a to
bd5d88b
Compare
This comment has been minimized.
This comment has been minimized.
bd5d88b to
6d6c750
Compare
This comment has been minimized.
This comment has been minimized.
6d6c750 to
cd882a6
Compare
This comment has been minimized.
This comment has been minimized.
cd882a6 to
9bf1d12
Compare
This comment has been minimized.
This comment has been minimized.
469eaa6 to
aa56ad2
Compare
This comment has been minimized.
This comment has been minimized.
87a4a10 to
8853e96
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
fbf5d78 to
f12a929
Compare
5da8c04 to
844971a
Compare
844971a to
e97de41
Compare
|
|
||
| // Blur the editor to trigger the save/normalize path. | ||
| await page.keyboard.press("Tab"); | ||
| await page.waitForTimeout(500); |
There was a problem hiding this comment.
🔶 Medium — Hardcoded waitForTimeout delay
page.waitForTimeout(500) is a hardcoded sleep. Per e2e-test-guidelines, replace it with a web-first assertion that resolves as soon as the condition is met.
After pressing Tab to blur, the editor's empty-content normalisation is synchronous within Tiptap's state flush. A reliable wait is:
| await page.waitForTimeout(500); | |
| await expect(editor).toHaveAttribute("data-placeholder"); |
Or, if you want to assert the save has propagated to the Mendix attribute, wait for the text-content assertion itself (Playwright retries automatically):
await page.keyboard.press("Tab");
await expect(editor).toContainText("");Either avoids the 500 ms wall-clock cost and the flakiness risk of a fixed sleep.
| await page.goto("/p/classmode"); | ||
| await waitForMendixApp(page); | ||
| await expect(page.locator(".mx-name-richText1")).toBeVisible(); | ||
| await expect(page.locator(".mx-name-richText1")).toHaveScreenshot(`classModeEditor.png`, { threshold: 0.4 }); |
There was a problem hiding this comment.
🔶 Medium — Missing screenshot baselines for new class-mode tests
classModeEditor.png and classModeViewCodeDialog.png (line 170) are referenced by toHaveScreenshot but their baseline PNGs are not committed to the snapshots directory. Playwright will fail on first run because there is nothing to compare against.
Per the E2E guidelines, baseline images must be committed with the spec. Generate and commit them before merging:
cd packages/pluggableWidgets/rich-text-web
pnpm run e2e --update-snapshots
git add e2e/RichText.spec.js-snapshots/classModeEditor-chromium-linux.png \
e2e/RichText.spec.js-snapshots/classModeViewCodeDialog-chromium-linux.png
Pull request type
Description